Additional Notes

  • Zernike.metrics(ΔW::WavefrontError) exists;

  • Zernike.format_strings(m, n) will return both the Unicode and LaTeX string representations directly;

  • The zplot function can be invoked independently using Polynomial and WavefrontError function types, quantized wavefront errors, and Observables of each; the plot will update each time the Observable changes (see the docstring for more info);

  • If you resize the plot window, right clicking on the figure will resize / trim the plot automatically so that it fits within the window without extra space;

  • Polynomial and WavefrontError types can be indexed (zero-based) to return a specific coefficient; their full vector of coefficients can be conveniently accessed using single-argument getindex (e.g. z[], w[]);

  • The Zernike polynomials are currently only valid up to degree ~812 at which point the maximum coefficient approaches the maximum for double-precision floating-point numbers (~1e308);

    • because 64-bit floats are used for an expanded range by default the coefficients are exactly accurate up to order ~47, limited by the 53-bit (~1e16) precision of the significand after which results are only approximate; if more accuracy is desired arbitrary precision or plain Ints can be specified by passing the appropriate type (Int, BigInt, BigFloat) as the third argument to Zernike.radial_coefficients;
  • If you're interested in precompiling the package into a system image in order to speed up load times please see the precompile directory (at the moment PrecompileTools or the like is not used);

  • If you're interested in only the full vector of Zernike expansion coefficients obtained through the least squares fit and want to avoid computing extra values and plotting the results you can call:

Zernike.wavefront_coefficients(ρ, θ, OPD, n_max)

Similarly you can do this for the radial polynomial coefficients and the NA transformed wavefront error expansion coefficients by importing the functions radial_coefficients and transform_coefficients, respectively.